#include<iostream>
using namespace std;
typedef long long LL;
int n, m, a;
int main()
{
	cin >> n >> m >> a;
	LL ans = 1ll * (n + a - 1) / a * ((m + a - 1) / a);
	cout << ans << endl;
	/*int ans1 = n / a, ans2 = m / a;
	if (n % a != 0) ans1 = n / a + 1;
	if (m % a != 0)ans2 = m / a + 1;
	cout << 1ll * ans1 * ans2 << endl;*/
	return 0;
}
